package com.minhua.jijiehao2.mainframe.creditcard.creditcardfragment.impl

import com.minhua.jijiehao2.bean.BaseBean
import com.minhua.jijiehao2.bean.CreditCardBean
import com.minhua.jijiehao2.http.*
import com.minhua.jijiehao2.mainframe.creditcard.creditcardfragment.imp.ICreditCardModel

class CreditCardModel : ICreditCardModel {
    override fun getCreditCardList(map: ParamsMap, callBack: CallBack<List<CreditCardBean>>) {
        HttpController<List<CreditCardBean>>().doHttp(
                ApiClient.getInstance().api.getListOfCreditCard(map.toRequestBody()),
                object : BaseSubscriber<List<CreditCardBean>>() {
                    override fun dealData(t: BaseBean<List<CreditCardBean>>) {
                        callBack.onSuccess(t)
                    }
                },
                false
        )
    }
}